import request from './request'

// 获取帖子列表
export const getPosts = (params) => {
  return request.get('/post/search/list', {
    params
  })
}

// 根据id获取帖子
export const getPostById = (postId) => {
  return request({
    url: '/post/get/one',
    method: 'get',
    params: {
      postId: postId
    }
  })
}
